import { useRoutes } from 'react-router-dom'
// 登录
import Login from '../pages/login/login'
// 主页
import Index from '../pages/index/index'
// 首页
import Home from '../pages/home/home'
// 访客纪录
import Visitorslist from '../pages/visitors/visitorsList'
import Visitorsadd from '../pages/visitors/Visitorsadd'
const Routers = () => {
    return useRoutes([
        {
            path: '/login',
            element: <Login />
        },
        {
            path: '/index',
            element: <Index />,
            children: [
                {
                    path: 'home',
                    index:true,
                    element: <Home />
                },
                {
                    path: 'visitorsList',
                    element: <Visitorslist />
                },
                {
                    path: 'visitorsadd',
                    element: <Visitorsadd />
                }
                ,
                {
                    path: 'visitorsadd',
                    element: <Visitorsadd />
                }
                ,
                {
                    path: 'visitorsadd',
                    element: <Visitorsadd />
                }
                ,
                {
                    path: 'visitorsadd',
                    element: <Visitorsadd />
                }

                ,
                {
                    path: 'visitorsadd',
                    element: <Visitorsadd />
                }
            ]
        },
        {
            path: '/*',
            element: <Login />
        }

    ])
}
export default Routers